#! /bin/sh

case $1 in
    remove)
        rm /usr/bin/pywebget
        ;;
	purge)
		rm -f /etc/pywebget/settings.json
		rmdir --ignore-fail-on-non-empty /etc/pywebget

		rm -f /var/lib/pywebget/db.sqlite
		rmdir --ignore-fail-on-non-empty /var/lib/pywebget

		update-rc.d pywebget remove >/dev/null

		if which deluser >/dev/null 2>&1; then
			deluser --quiet debian-pywebget > /dev/null || true
		fi
		;;
esac

exit 0